<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: 宝贝嘉燕
  Date: 2021/9/27
  Time: 9:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    List userList=new ArrayList();
    userList.add("Tom");
    userList.add("Make");
    userList.add("Lina");
%>
<table border="1px">
    <tr>
        <th>序号</th>
        <th>索引</th>
        <th>是否为第一个元素</th>
        <th>是否为最后一个元素</th>
        <th>元素的值</th>
    </tr>
    <c:forEach items="<%=userList%>" varStatus="st" var="name">
        <tr>
            <td>${st.count}</td>
            <td>${st.index}</td>
            <td>${st.first}</td>
            <td>${st.last}</td>
            <td>${name}</td>

        </tr>


    </c:forEach>
</table>
</body>
</html>
